import request from '@/utils/request'

export function getEmpList() {
  return request({
    url: '/admin/leaves/emp/getList',
    method: 'get'
  })
}

export function getListBySearch(searchObj) {
  return request({
    url: '/admin/leaves/emp/getListBySearch',
    method: 'post',
    data: searchObj
  })
}

export function deleteEmp(id) {
  return request({
    url: `/admin/leaves/emp/deleteEmp/${id}`,
    method: 'delete'
  })
}

export function createEmp(data) {
  return request({
    url: '/admin/leaves/emp/createEmp',
    method: 'post',
    data
  })
}

export function updateEmp(data) {
  return request({
    url: '/admin/leaves/emp/updateEmp',
    method: 'put',
    data
  })
}
